package sc.love.boot.aop;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @ClassName AspectPorxy
 * @Description aop切点代理类
 * @Author 15393
 * @Date 2020/5/29 15:03
 * @Version V1.0
 */
@Aspect
@Component
public class AspectPorxy {

    @Pointcut("execution(public * sc.love.boot.aop.StaticPorxy.*(.. ))")
    public void pointCut1(){}


    @Before("pointCut1()")
    public void before1(){
        System.out.println("执行静态代理之前 before1");
    }

    @After("pointCut1()")
    public void after1(){
        System.out.println("执行静态代理之前 after1");
    }

    @Pointcut("execution(public * sc.love.boot.aop.StaticPorxy.*(.. ))")
    public void pointCut2(){}


    @Before("pointCut2()")
    public void before2(){
        System.out.println("执行静态代理之前 before2");
    }

    @After("pointCut2()")
    public void after2(){
        System.out.println("执行静态代理之前 after2");
    }

}